<%--
  Created by IntelliJ IDEA.
  User: Z-7
  Date: 2022/3/4
  Time: 11:57
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<blockquote class="blockquote text-center">
    <p class="mb-0">豪哥商城</p>
    <footer class="blockquote-footer">welcome<cite title="Source Title">HaoGeShop</cite></footer>
</blockquote>
<nav class="navbar navbar-expand-lg navbar-light bg-light container">
    <a class="navbar-brand" href="#">HaoGeShop</a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
        <ul class="navbar-nav mr-auto">
            <li class="nav-item active">
                <a class="nav-link" href="${pageContext.request.contextPath}/goods/list">首页<span class="sr-only">(current)</span></a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="${pageContext.request.contextPath}/carts/detail">购物车详情</a>
            </li>
            <li class="nav-item dropdown">
                <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-expanded="false">
                    个人资料
                </a>
                <div class="dropdown-menu" aria-labelledby="navbarDropdown">
                    <c:if test="${LOGIN_USER == null}">
                        <a class="dropdown-item" href="${pageContext.request.contextPath}/user/login">登录</a>
                    </c:if>
                    <c:if test="${LOGIN_USER != null}">
                        <a class="dropdown-item" href="${pageContext.request.contextPath}/user/loginOut">退出</a>
                    </c:if>
                    <div class="dropdown-divider"></div>
                    <a class="dropdown-item" href="#">进入个人主页</a>
                </div>
            </li>
            <li class="nav-item">
                <a class="nav-link disabled">${LOGIN_USER.username}</a>
            </li>
        </ul>
    </div>
</nav>
